export const isFunction = (f: any): boolean => {
  return typeof f === 'function';
};

export const findDifferences = (
  data: Record<string, any>,
  checkData: Record<string, any>,
) => {
  return Object.entries(checkData).reduce<Record<string, any>>(
    (prev, [key, value]) => {
      if (data[key] !== value) {
        prev[key] = checkData[key];
      }
      return prev;
    },
    {},
  );
};
